// 组织架构接口api模块
import request from '@/utils/request'
// 获取公司部门列表
export const reqGetDepartments = () => request({
  method: 'get',
  url: '/company/department'
})

// 删除部门的接口
export const reqDelDEpartment = id => request({
  method: 'delete',
  url: `/company/department/${id}`
})

// 新增部门
export const reqAddDepartments = data => request({
  method: 'post',
  url: '/company/department',
  data
})

// 根据id查询部门详情
export const reqGetDepartDetail = id => request({
  method: 'get',
  url: `/company/department/${id}`
})

// 根据id更新部门详情
// post put patch 携带请求体参数使用data
// get delete携带请求体参数使用params
export const reqUpdateDepartments = data => request({
  method: 'put',
  url: `/company/department/${data.id}`,
  data
})

